package com.treetao.union.db.config;

import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.treetao.union.core.id.SnowflakeIdGenerator;

/**
 * 自动填充处理类
 * @author devm
 *
 */

@Component
public class MyMetaObjectHandler implements MetaObjectHandler {

	@Override
	public void insertFill(MetaObject metaObject) {
		//自定义ID主键值 
		// this.setFieldValByName("id", SnowflakeIdGenerator.nextId(), metaObject);
	}

	@Override
	public void updateFill(MetaObject metaObject) {
		// TODO Auto-generated method stub

	}

}
